feat(nmrs): OpenVPN compression and proxy support#315
feat(nmrs): OpenVPN compression and proxy support#315stoutes wants to merge 5 commits intocachebag:dev-openvpnfrom
Conversation
…mports to crate root
|
@stoutes I'd presume the builder should/would mesh with that in some way. We'd want to reconcile the approach we made in #309 for Please also update your PR description as well to mention the issues you tackled directly. It looks like you're doing both #292 and #299. In the future, I'd prefer you keep a PR to one issue, unless they're related in some fashion. (#288 is just the tracking issue for OpenVPN support so I wouldn't call them related). Lastly, HUGE nitpick, but your commit messages should be |
e52daf0 to
6f56cf5
Compare
c1acdfe to
5d65aa0
Compare
So for the meshing are you thinking of some sort of conversion so the parser output can flow into the builder? |
@stoutes pub struct OpenVpnConfig {
pub name: String,
pub remote: String,
pub port: u16,
pub tcp: bool,
pub auth_type: Option<OpenVpnAuthType>,
pub auth: Option<String>,
pub cipher: Option<String>,
pub dns: Option<Vec<String>>,
pub mtu: Option<u32>,
pub uuid: Option<Uuid>,
pub ca_cert: Option<String>,
pub client_cert: Option<String>,
pub client_key: Option<String>,
pub key_password: Option<String>,
pub username: Option<String>,
pub password: Option<String>,
}Slightly different from yours. All you need to do is rebase onto |
Summary
Part of #288, closes #292, closes #299.
Adds OpenVPN compression and proxy support to the builder layer, including
the
build_openvpn_connection()function and all supporting types.Changes
api/models/vpn.rsOpenVpnCompressionenum mapping to NMcompressandcomp-lzokeysLzomarked#[deprecated]—comp-lzois deprecated upstream in favour ofcompressNocarry VORACLE vulnerability warnings in their doc commentsOpenVpnProxyenum withHttpandSocksvariants mapping to NM proxy keysOpenVpnConfigstruct with builder methods for port, compression, proxy, DNS, and UUIDpub use vpn::*inapi/models/mod.rsand re-exported at crate root inlib.rsapi/builders/vpn.rsbuild_openvpn_connection()— builds a complete NM settings dict for OpenVPNconnection.type = "vpn",vpn.service-type = "org.freedesktop.NetworkManager.openvpn"vpn.dataasVec<(String, String)>OpenVpnCompressionvariants to correct NM keysOpenVpnProxyvariants, validates port is non-zero#[allow(deprecated)]on theLzoarm inside the builder so the function itself doesn't warnNotes
build_openvpn_connectionis wired intocore/vpn.rsdispatch but theOpenVpnarm inconnect_vpncurrently returnsVpnFailed("not yet implemented")until the fullconnect flow from openvpn support #288 lands.